libostree: Adjust `cleanup_ref_prefix` to use ostree_repo_list_refs_ext
authorGiuseppe Scrivano <gscrivan@redhat.com>
Wed, 2 Mar 2016 09:14:23 +0000 (10:14 +0100)
committerColin Walters <walters@verbum.org>
Wed, 2 Mar 2016 19:52:02 +0000 (14:52 -0500)
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
src/libostree/ostree-sysroot-cleanup.c

index 718c16e821b04ba92c2c11a8a000a0da6761b431..f053ac02cfd949d8f1383999c8b771e5c5f1e115 100644 (file)
@@ -401,7 +401,7 @@ cleanup_ref_prefix (OstreeRepo         *repo,
 
   prefix = g_strdup_printf ("ostree/%d/%d", bootversion, subbootversion);
 
-  if (!ostree_repo_list_refs (repo, prefix, &refs, cancellable, error))
+  if (!ostree_repo_list_refs_ext (repo, prefix, &refs, OSTREE_REPO_LIST_REFS_EXT_NONE, cancellable, error))
     goto out;
 
   if (!ostree_repo_prepare_transaction (repo, NULL, cancellable, error))
@@ -410,8 +410,7 @@ cleanup_ref_prefix (OstreeRepo         *repo,
   g_hash_table_iter_init (&hashiter, refs);
   while (g_hash_table_iter_next (&hashiter, &hashkey, &hashvalue))
     {
-      const char *suffix = hashkey;
-      g_autofree char *ref = g_strconcat (prefix, "/", suffix, NULL);
+      const char *ref = hashkey;
       ostree_repo_transaction_set_refspec (repo, ref, NULL);
     }